private static class ReactiveAdapterRegistry.ReactorAdapter extends ReactiveAdapter
Flux
or
Mono
depending on ReactiveTypeDescriptor.isMultiValue()
.
This is important in places where only the stream and stream element type
information is available like encoders and decoders.Constructor and Description |
---|
ReactorAdapter(ReactiveTypeDescriptor descriptor,
java.util.function.Function<java.lang.Object,<any>> toPublisherFunction,
java.util.function.Function<<any>,java.lang.Object> fromPublisherFunction) |
Modifier and Type | Method and Description |
---|---|
<T> <any> |
toPublisher(java.lang.Object source)
Adapt the given instance to a Reactive Streams
Publisher . |
fromPublisher, getDescriptor, getReactiveType, isMultiValue, isNoValue, supportsEmpty
ReactorAdapter(ReactiveTypeDescriptor descriptor, java.util.function.Function<java.lang.Object,<any>> toPublisherFunction, java.util.function.Function<<any>,java.lang.Object> fromPublisherFunction)
public <T> <any> toPublisher(@Nullable java.lang.Object source)
ReactiveAdapter
Publisher
.toPublisher
in class ReactiveAdapter
source
- the source object to adapt from; if the given object is
null
, ReactiveTypeDescriptor.getEmptyValue()
is used.